import random


class BH3EquipPool:
    UP_WEAPON = 1
    STIGMA_A = 2
    STIGMA_B = 3
    STIGMA_C = 4
    OTHER = 5

    def next(self):
        r = random.random()
        if r < 0.02479:
            return BH3EquipPool.UP_WEAPON
        elif r < 0.02479 + 0.0124:
            return BH3EquipPool.STIGMA_A
        elif r < 0.02479 + 0.0124 * 2:
            return BH3EquipPool.STIGMA_B
        elif r < 0.02479 + 0.0124 * 3:
            return BH3EquipPool.STIGMA_C
        else:
            return BH3EquipPool.OTHER
